import 'package:flutter/material.dart';
import 'package:music_app/widget/animated_bar.dart';

class RealisticPlayingIndicator extends StatelessWidget {
  final int barCount;
  final double width;
  final double height;
  final Color color;

  const RealisticPlayingIndicator({
    super.key,
    this.barCount = 3,
    this.width = 4,
    this.height = 20,
    this.color = Colors.red,
  });

  @override
  Widget build(BuildContext context) {
    return SizedBox(
      width: barCount * (width + 2),
      height: height,
      child: Row(
        mainAxisSize: MainAxisSize.min,
        crossAxisAlignment: CrossAxisAlignment.end,
        children: List.generate(barCount, (_) {
          return Padding(
            padding: const EdgeInsets.symmetric(horizontal: 1),
            child: AnimatedBar(
              width: width,
              maxHeight: height,
              color: color,
            ),
          );
        }),
      ),
    );
  }
}
